Optimal. Leaf size=88 \[ -\frac {\left (a^2+b^2\right ) \log (\cos (c+d x))}{b^3 d}+\frac {\left (a^2+b^2\right ) \log (a \cos (c+d x)+b \sin (c+d x))}{b^3 d}-\frac {a \tan (c+d x)}{b^2 d}+\frac {\sec ^2(c+d x)}{2 b d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.14, antiderivative size = 88, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3104, 3767, 8, 3102, 3475, 3133} \[ -\frac {\left (a^2+b^2\right ) \log (\cos (c+d x))}{b^3 d}+\frac {\left (a^2+b^2\right ) \log (a \cos (c+d x)+b \sin (c+d x))}{b^3 d}-\frac {a \tan (c+d x)}{b^2 d}+\frac {\sec ^2(c+d x)}{2 b d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3102
Rule 3104
Rule 3133
Rule 3475
Rule 3767
Rubi steps
\begin {align*} \int \frac {\sec ^3(c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx &=\frac {\sec ^2(c+d x)}{2 b d}-\frac {a \int \sec ^2(c+d x) \, dx}{b^2}+\frac {\left (a^2+b^2\right ) \int \frac {\sec (c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx}{b^2}\\ &=\frac {\sec ^2(c+d x)}{2 b d}+\frac {\left (a^2+b^2\right ) \int \frac {b \cos (c+d x)-a \sin (c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx}{b^3}+\frac {\left (a^2+b^2\right ) \int \tan (c+d x) \, dx}{b^3}+\frac {a \operatorname {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{b^2 d}\\ &=-\frac {\left (a^2+b^2\right ) \log (\cos (c+d x))}{b^3 d}+\frac {\left (a^2+b^2\right ) \log (a \cos (c+d x)+b \sin (c+d x))}{b^3 d}+\frac {\sec ^2(c+d x)}{2 b d}-\frac {a \tan (c+d x)}{b^2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.15, size = 52, normalized size = 0.59 \[ \frac {\left (a^2+b^2\right ) \log (a+b \tan (c+d x))-a b \tan (c+d x)+\frac {1}{2} b^2 \tan ^2(c+d x)}{b^3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.66, size = 117, normalized size = 1.33 \[ \frac {{\left (a^{2} + b^{2}\right )} \cos \left (d x + c\right )^{2} \log \left (2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}\right ) - {\left (a^{2} + b^{2}\right )} \cos \left (d x + c\right )^{2} \log \left (\cos \left (d x + c\right )^{2}\right ) - 2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + b^{2}}{2 \, b^{3} d \cos \left (d x + c\right )^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 4.59, size = 54, normalized size = 0.61 \[ \frac {\frac {b \tan \left (d x + c\right )^{2} - 2 \, a \tan \left (d x + c\right )}{b^{2}} + \frac {2 \, {\left (a^{2} + b^{2}\right )} \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{b^{3}}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.23, size = 72, normalized size = 0.82 \[ \frac {\tan ^{2}\left (d x +c \right )}{2 d b}-\frac {a \tan \left (d x +c \right )}{b^{2} d}+\frac {\ln \left (a +b \tan \left (d x +c \right )\right ) a^{2}}{d \,b^{3}}+\frac {\ln \left (a +b \tan \left (d x +c \right )\right )}{d b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.60, size = 238, normalized size = 2.70 \[ -\frac {\frac {2 \, {\left (\frac {a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {b \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {a \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}\right )}}{b^{2} - \frac {2 \, b^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {b^{2} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}} - \frac {{\left (a^{2} + b^{2}\right )} \log \left (-a - \frac {2 \, b \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )}{b^{3}} + \frac {{\left (a^{2} + b^{2}\right )} \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{b^{3}} + \frac {{\left (a^{2} + b^{2}\right )} \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{b^{3}}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.50, size = 300, normalized size = 3.41 \[ \frac {2\,b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-2\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (b^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-2\,b^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+b^3\right )}-\frac {a^2\,\mathrm {atan}\left (\frac {b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,1{}\mathrm {i}-b^2\,1{}\mathrm {i}+2{}\mathrm {i}\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{-2\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,a^2+2\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+b^2}\right )\,2{}\mathrm {i}+b^2\,\mathrm {atan}\left (\frac {b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,1{}\mathrm {i}-b^2\,1{}\mathrm {i}+2{}\mathrm {i}\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{-2\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,a^2+2\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+b^2}\right )\,2{}\mathrm {i}}{b^3\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sec ^{3}{\left (c + d x \right )}}{a \cos {\left (c + d x \right )} + b \sin {\left (c + d x \right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________